package com.oocl.crmweb.service.impl;

import java.util.List;

import com.oocl.crmweb.dao.CustomerDao;
import com.oocl.crmweb.dao.impl.CustomerDaoImpl;
import com.oocl.crmweb.pojo.Customer;
import com.oocl.crmweb.service.CustomerManager;

public class CustomerManagerImpl implements CustomerManager {
	
	private CustomerDao customerDao;

	CustomerManagerImpl() {
		customerDao = new CustomerDaoImpl();
	}
	
	@Override
	public int addCustomer(Customer c) {
		return customerDao.add(c);
	}

	@Override
	public List<Customer> findAllCustomers() {
		return customerDao.findAll();
	}
	
	@Override
	public Customer loadCustomer(Integer id) {
		return customerDao.load(id);
	}

	@Override
	public int updateCustomer(Customer c) {
		return customerDao.update(c);
	}

	@Override
	public int deleteCustomer(Integer id) {
		return customerDao.delete(id);
	}

}
